package com.bltec.emergency.service.foreignService.impl;

import com.bltec.emergency.mapper.ForeignSortiesMapper;
import com.bltec.emergency.model.ForeignSorties;
import com.bltec.emergency.service.foreignService.ForeignSortiesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ForeignSortiesServiceImpl implements ForeignSortiesService {
    @Resource
    private ForeignSortiesMapper foreignSortiesMapper;
    @Override
    public boolean add(ForeignSorties foreignSorties) {
        return foreignSortiesMapper.insert(foreignSorties);
    }

    @Override
    public boolean deleteForeignSortiesById(Long id) {
        return foreignSortiesMapper.setDisableById(id);
    }

    @Override
    public boolean updateForeignSortiesById(ForeignSorties foreignSorties) {
        return foreignSortiesMapper.updateForeignSortiesById(foreignSorties);
    }

    @Override
    public ForeignSorties getForeignSortiesById(Long id) {
        return foreignSortiesMapper.getForeignSortiesById(id);
    }

    @Override
    public List<ForeignSorties> getAll() {
        return foreignSortiesMapper.selectAll();
    }
}
